<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <title>资产统计</title>
    <link rel="stylesheet" href="../../css/reset.css" />
    <style>
        body {
            width: 100%;
            background-color: #F8F8F8;
            font-size: 0.28rem;
            height: auto;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: PingFangSC-Regular, sans-serif;
            color: #333333;
        }

        .filCoinNum {
            width: 6.9rem;
            height: 1.3rem;
            background: linear-gradient(-87deg, #FFCC35, #FFDB57);
            border-radius: 0.06rem;
            margin-left: calc((100% - 6.9rem) / 2);
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 0.38rem;
            box-sizing: border-box;
            margin-top: 0.3rem;
            font-size: 0.36rem;
            margin-bottom: 0.27rem;
        }

        .otherColor {
            font-size: 0.24rem;
            font-weight: 500;
            color: #262626;
            line-height: 48px;
            opacity: 0.69;
            margin-right: 0.25rem;
        }

        .filNum {
            font-size: 0.28rem;
            font-family: DIN Medium;
            font-weight: 400;
            color: #262626;
        }

        .showDeatail {
            width: 6.9rem;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
            background-color: #fff;
            margin-left: calc((100% - 6.9rem) / 2);
            border-radius: 0.1rem;
        }

        .freezeNum {
            width: 100%;
            height: 0.78rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 .3rem;
            box-sizing: border-box;
            border-bottom: 1px solid #efefef;
            font-size: 0.3rem;
            font-family: PingFang SC;
            font-weight: 600;
            color: #595959;
            opacity: 0.98;
        }

        .coinlist {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 0 0.3rem;
            box-sizing: border-box;
        }

        .coinlist li {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 0.31rem 0;
            border-bottom: 1px solid #efefef;
        }

        .coinlist li:last-of-type {
            border-bottom: none;
        }

        .coinlist li>p {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.26rem;
            font-weight: 500;
            color: #595959;
            margin-bottom: 0.3rem;
        }

        .coinlist li>div {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
        }

        .coinlist li>div:first-of-type {
            margin-bottom: 0.18rem;
        }

        .coinlist li>div p {
            width: 50%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: #999999;
        }

        .coinlist li>div p:nth-child(even) {
            padding-left: 0.5rem;
            box-sizing: border-box;
            justify-content: space-between;
        }

        .coinlist li>div p span:first-of-type {
            margin-right: 0.2rem;
        }

        .showMoreFrezz {
            width: 6.9rem;
            height: 0.7rem;
            background: #FFFDF3;
            border: 1px solid #FFEBEB;
            border-radius: 0.14rem;
            margin-left: calc((100% - 6.9rem) / 2);
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 0.3rem;
            box-sizing: border-box;
            font-size: 0.26rem;
            color: #FF771C;
            margin-top: 0.3rem;
        }

        .showMoreFrezz img:first-child {
            width: 0.26rem;
            margin-right: 0.06rem;
            margin-bottom: 0.06rem;
        }

        .showMoreFrezz>img {
            width: 0.14rem;
        }
    </style>
</head>

<body>
    <div class="filCoinNum">
        <b>
            FIL
        </b>
        <b>
            <span class="otherColor">
                可用
            </span>
            <span class="filNum">
                --
            </span>
        </b>
    </div>
    <div class="showDeatail">
        <p class="freezeNum">
            <span>
                冻结
            </span>
            <span class="frezzcoinNum">
                --
            </span>
        </p>
        <ul class="coinlist">
            <!-- <li>
                <p>
                    <span>
                        产出冻结
                    </span>
                    <span>
                        --
                    </span>
                </p>
                <div>
                    <p>
                        <span>
                            今日冻结
                        </span>
                        <span>
                            --
                        </span>
                    </p>
                    <p>
                        <span>
                            累计冻结
                        </span>
                        <span>
                            --
                        </span>
                    </p>
                </div>
                <div>
                    <p>
                        <span>
                            今日解冻
                        </span>
                        <span>
                            --
                        </span>
                    </p>
                    <p>
                        <span>
                            累计解冻
                        </span>
                        <span>
                            --
                        </span>
                    </p>
                </div>
            </li> -->
        </ul>
    </div>
    <div class="showMoreFrezz">
        <span>
            <img src="../../image/asasdgggh.png">
            查看冻结明细
        </span>
        <img src="../../image/rightjinatd.png">
    </div>
</body>
<script src="../../script/autosize.js"></script>
<script src="../../script/fastclick.js"></script>
<script src="../../script/jquery_three_two_one.js"></script>
<script src="../../script/dotmin.js"></script>
<script src="../../script/app.js"></script>
<script>
    apiready = function () {
        var app = new APP();
        var account = app.getAccount();
        $(".filNum").text(api.pageParam.coinNum);
        $(".frezzcoinNum").text(api.pageParam.freeeNum);
        function loadpage(isdown) {
            app.ajaxPro({
                url: "member/get-freeze-total",
                values: {
                    token: account.token
                },
                openFlower: true
            }, function (ret) {
                if (ret.code == 200) {
                    var dataArr = [];
                    if (!ret.data) {
                        for (var i = 0; i < 3; i++) {
                            var numData = {
                                totalNum: 0,
                                totalUnfreezeNum: 0,
                                todayFreezeAmount: 0,
                                freezeType: i + 1,
                                todayUnFreezeAmount: 0,
                                diffNumdata: 0
                            };
                            dataArr.push(numData);
                        }
                    } else {
                        dataArr = ret.data;
                        dataArr.map(function(item) {
                            item.diffNumdata = app.numSub(item.totalNum,item.totalUnfreezeNum);
                        })
                    }
                    var temp = doT.template($("#frezzData").text());
                    $(".coinlist").html(temp(dataArr));
                } else {
                    app.toast(ret.message);
                }
            })
        }
        loadpage(true);
        $(".showMoreFrezz").click(function () {
            var pageValue = {
                name: "frezz_filcoin",
                subpage: "ipfs/frezz_filcoin",
                title: "冻结记录明细",
                param: {
                    pageName: "frezz_filcoin"
                }
            }
            app.setNavBarAttr(pageValue);
        })
        app.headerMap();
    }
</script>
<!-- 其他冻结 -->
<script type="text/html" id="frezzData">
    {{~it:it:index}}
    <li>
        <p>
            <span>
               {{?it.freezeType==3}}
                当前其他冻结
               {{??it.freezeType==2}}
               当前质押冻结
               {{??}}
               当前产出冻结
               {{?}}
            </span>
            <span>
                {{=it.diffNumdata}}
            </span>
        </p>
        <div>
            <p>
                <span>
                    今日冻结
                </span>
                <span>
                    {{=it.todayFreezeAmount}}
                </span>
            </p>
            <p>
                <span>
                    累计冻结
                </span>
                <span>
                    {{=it.totalNum}}
                </span>
            </p>
        </div>
        <div>
            <p>
                <span>
                    今日解冻
                </span>
                <span>
                    {{=it.todayUnFreezeAmount}}
                </span>
            </p>
            <p>
                <span>
                    累计解冻
                </span>
                <span>
                    {{=it.totalUnfreezeNum}}
                </span>
            </p>
        </div>
    </li>
    {{~}}
</script>

</html>